package com.van.bo.badwrting;

import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.get.GetRequest;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.common.inject.internal.Stopwatch;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.reflections.Reflections;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigurationExcludeFilter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.TypeExcludeFilter;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.util.Set;


/**
 *
 * 特殊字符处理  es
 * https://www.cnblogs.com/clonen/p/6674888.html
 *
 *
 *
 * https://mp.weixin.qq.com/s/aulr7ooPnaC-RXz3LKNGcw
 * 2.4的分组配置
 * 在升级spring boot到2.4之后，再启动之前的应用，你会发现配置就没有生效了，
 * 这里不仅是因为spring.profiles失效的原因，即使我们将其都修改为spring.config.activate.on-profile，
 * 也依然无法激活dev-db和dev-mq的配置。
 * <p>
 * 因为在2.4版本之后，我们需要使用spring.profiles.group来配置了，同时组织结构也发生了变化。
 * <p>
 * 可以尝试把配置修改成如下格式：
 * spring:
 * profiles:
 * active: "dev"
 * group:
 * "dev": "dev-db,dev-mq"
 * "prod": "prod-db,prod-mq"
 * <p>
 * ---
 * spring:
 * config:
 * activate:
 * on-profile: "dev-db"
 * <p>
 * db: dev-db.didispace.com
 * <p>
 * ---
 * spring:
 * config:
 * activate:
 * on-profile: "dev-mq"
 * <p>
 * mq: dev-mq.didispace.com
 */
@SpringBootApplication
public class BadPenApplication {

    public static void main(String[] args) {
        SpringApplication.run(BadPenApplication.class, args);
    }
}


